<template>
  <div class="app">
	<top></top>
	<!-- 导航区 -->
	<div class="navigate">
    <!-- to的第一种写法，字符串 -->
    <RouterLink to="/message" active-class="active">信息展示</RouterLink>
    <!-- to的第二种写法，对象 -->
    <RouterLink :to="{path:'/home'}" active-class="active">后台主页</RouterLink>
    <!-- to的第二种写法，对象（配置时，可以直接指定path路径，也可以直接指定路由的名字进行配置） -->
		<RouterLink :to="{name:'guanyu'}" active-class="active">联系我们</RouterLink>
	</div>
	<!-- 显示区 -->
	 <div class="main-content">
    <RouterView></RouterView>
	 </div>
	 
  </div>
</template>
<script lang="ts" setup name="App">
import { RouterLink } from 'vue-router';
import top from './components/top.vue';



</script>

<style>
.app{
	background-color: lightgray;
	box-shadow: 6px 6px 12px gray;
	border-radius: 6px;
	line-height: 40px;
	padding:10px;
}
    /* App */
  .title {
    text-align: center;
    word-spacing: 5px;
    margin: 30px 0;
    height: 70px;
    line-height: 70px;
    background-image: linear-gradient(45deg, gray, white);
    border-radius: 10px;
    box-shadow: 0 0 2px;
    font-size: 30px;
  }
  .navigate {
    display: flex;
    justify-content: space-around;
    margin: 0 100px;
  }
  .navigate a {
    display: block;
    text-align: center;
    width: 150px;
    height: 40px;
    line-height: 40px;
    border-radius: 10px;
    background-color: gray;
    text-decoration: none;
    color: white;
    font-size: 18px;
    letter-spacing: 5px;
  }
  .navigate a.active {
    background-color: #64967E;
    color: #ffc268;
    font-weight: 900;
    text-shadow: 0 0 1px black;
    font-family: 微软雅黑;
  }
  .main-content {
    margin: 0 auto;
    margin-top: 30px;
    border-radius: 10px;
    width: 90%;
    height: 400px;
    border: 1px solid;
  }
</style>